import { MyContainer } from "@/containers/MyContainer.js";

export class LayerContainer extends MyContainer{
    constructor(){
        super();
        this.layers={};
    }

    add(name){
        let container=this.layers[name];
        if(!container){
            container=new MyContainer();
            this.addChild(container);
            this.layers[name]=container;
        }
        return container;
    }

    get(name){
        return this.layers[name];
    }
}